//
//  VisitorTableViewController.m
//  SinaBlog
//
//  Created by mac on 15/11/25.
//  Copyright © 2015年 ZZY. All rights reserved.
//

#import "VisitorTableViewController.h"
#import "VisitorView.h"

@interface VisitorTableViewController ()
// 判断是否登录
@property (nonatomic, assign) BOOL userLogin;

@end

@implementation VisitorTableViewController

-(BOOL)userLogin {
    _userLogin = false;
    return _userLogin;
}

- (void)loadView {
    
    if (self.userLogin) {
        [super loadView];
    } else {    // 访客视图
        
        // 设置导航栏按钮
        
        self.view = [[VisitorView alloc]init];
        
        self.view.backgroundColor = [UIColor colorWithWhite:237.0 / 255.0 alpha:1.0];
        
        
        self.navigationItem.leftBarButtonItem = [[UIBarButtonItem alloc]initWithTitle:@"注册" style:(UIBarButtonItemStylePlain) target:nil action:nil];
        self.navigationItem.rightBarButtonItem = [[UIBarButtonItem alloc]initWithTitle:@"登录" style:(UIBarButtonItemStylePlain) target:nil action:nil];
    }
}

- (void)viewDidLoad {
    [super viewDidLoad];
    
}






@end
